<?php
/**
 * Created by PhpStorm.
 * User: xaq
 * Date: 2017/5/15
 * Time: 10:39
 */

namespace app\api\model;

use think\Model;
use traits\model\SoftDelete;


class BaseModel extends Model
{
    use SoftDelete;

    protected $hidden = ['delete_time'];

    //给url前加路径
    protected function prefixImgUrl($value, $data) {
        $finalUrl = $value;
        if($data['from'] == 1){
            $finalUrl = config('setting.img_prefix_ip').$value;
        }
        return $finalUrl;
    }
}